package com.boot.utils;

import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class Config {
    @Bean
    public FilterRegistrationBean<TestFilter> registrationBean(){
        System.out.println("Config.registrationBean");
        FilterRegistrationBean<TestFilter> registrationBean = new FilterRegistrationBean<>();
        registrationBean.setFilter(new TestFilter());
        registrationBean.addUrlPatterns("/*");
//        registrationBean.setOrder(1);
        registrationBean.setName("TestFilter");
        return registrationBean;
    }
}
